package com.zhuzi.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.zhuzi.demo.service.UserService;

@RestController
@RequestMapping("/user")
public class UserController {
	@Autowired
	private UserService userService;
	
	@RequestMapping("/addUser1")
	public String addUser1(String userName,String password,String phone) throws Exception{
		userService.addUser1(userName,password,phone);
		return "success";
	}

	@RequestMapping("/addUser2")
	public String addUser2(String userName,String password,String phone) throws Exception{
		userService.addUser2(userName,password,phone);
		return "success";
	}
}